{include file="public/header"}
<title>详情</title>
</head>
<style>
    .ck {
        display: block;
        height: 117px;
        padding: 6px 12px;
        font-size: 14px;
        line-height: 1.42857143;
        color: #555;
        background-color: #fff;
        background-image: none;
        border: 1px solid #ccc;
        border-radius: 4px;
    "
    }
</style>
<body>
<article class="page-container">
    <form action="" method="post" class="form form-horizontal" id="form-member-add">
        <input type="hidden" name="order_id" value="{$data.order_id}">
        <input type="hidden" name="id" value="{$data.id}">
        <div class="ch-row ch-info-form">
            <div class="flex1">核算成本</div>
            <div class="flex2">
                <select name="type" class="form-control">
                    <option value="1"  <?php if($data["type"]==1){?> selected="selected" <?php }?>>是</option>
                    <option value="5"  <?php if($data["type"]==5){?> selected="selected" <?php }?>>否</option>
                </select>
            </div>
        </div>
        <div class="ch-row ch-info-form">
            <div class="flex1">报价金额</div>
            <div class="flex2 ch-row ">
                <textarea style="margin:0;height: 152px;" name="content"
                          class="form-control">{$data.content}</textarea>
            </div>

        </div>
        <div class="ch-row ch-info-form" style="margin-top: 0 ">
            <div class="flex1">
                <button class="btn btn-primary radius" type="button"><i class="Hui-iconfont">&#xe632;</i> 提交
                </button>
            </div>
        </div>

    </form>
</article>

{include file="public/footer"}
</body>
<script>
    $('.radius').click(function () {
        var src = "{:Url('index/order/cheng')}";
        $.ajax({
            type: 'POST',
            url: src,
            dataType: 'json',
            data: $('form').serializeArray(),
            success: function (data) {
                var res = JSON.parse(data);
                if (res.code == 200) {
                    layer.msg(res.msg, {icon: 1, time: 2000}, function () {
                        parent.location.reload()
                    });
                } else {
                    layer.msg(res.msg, {icon: 5, time: 1000});
                }

            },
            error: function (data) {
                console.log(data.msg);
            },
        });
    });

</script>

</html>
